package com.feini.ktv.svc.controller.pm;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.feini.ktv.svc.entity.pm.PmResGoods;
import com.feini.ktv.svc.service.pm.IPmResGoodsService;
import com.podara.skeleton.controller.SkeletonController;
import com.podara.skeleton.log.annotation.LogLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 库存定义信息
 * </p>
 *
 * @author jiangzr
 * @since 2021-04-17
 */
@LogLogger
@RestController
public class PmResGoodsController implements SkeletonController {
    @Autowired
    private IPmResGoodsService resGoodsService;

    @GetMapping("/queryResGoodsLikeName/{offerName}")
    public List<PmResGoods> queryResGoodsLikeName(@PathVariable("offerName") String offerName) {
        QueryWrapper<PmResGoods> offer = new QueryWrapper<PmResGoods>();
        offer.like("offer_name", offerName);
        List<PmResGoods> offerList = this.resGoodsService.list(offer);
        return offerList;
    }
}

